package com.zhulanhua.blogs.controller.params;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class userUpdateMd5Params implements Serializable {
    @NotBlank(message = "用户名不能为空")
    String userName;//用户名

    @Pattern.List({@Pattern(regexp = "/^([a-z0-9_\\.-]+)@([\\da-z\\.-]+)\\.([a-z\\.]{2,6})$/", message = "邮箱格式不正确"),
            @Pattern(regexp = "/^[a-z\\d]+(\\.[a-z\\d]+)*@([\\da-z](-[\\da-z])?)+(\\.{1,2}[a-z]+)+$/", message = "邮箱格式不正确")})
    @NotBlank(message = "用户邮箱不能为空")
    String userMail;//邮箱
}
